import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 查询人员费用表
   * @param {Object} formData *
   * @return {Object}
   */
  queryPersonnelVariety(param) {
    return xjaxios.post("v3/performance/personnelExpenses/queryByEmployeeIdAndTime", param);
  },
  queryPersonnelVarietyinfo(param) {
    return xjaxios.post("v3/performance/personnelExpenses/queryPageList", param);
  },
  // /**
  //  * @description: 条件查询所有员工
  //  * @param null *
  //  * @return {Object}
  //  */
  getStaffListByCondition() {
    return xjaxios.post("v3/organization/personDepartmentMapper/queryByCondition", {
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 添加人员费用表
   * @param {Object} formData *
   * @return {Object}
   */
  addPersonnelExpensesInfo(formData) {
    formData.organizationNo = sessionStorage.organizationNo;
    return xjaxios.post("v3/performance/personnelExpenses/add", formData);
  },
  /**
   * @description: 编辑人员费用表
   * @param {Object} formData *
   * @return {Object}
   */
  editInspectionRouteInfo(formData) {
    return xjaxios.post("v3/performance/personnelExpenses/edit", formData);
  },
  /**
   * @description: 批量删除人员费用表
   * @param {Object} formData *
   * @return {Object}
   */
  delPersonnelExpensesInfo(list) {
    return xjaxios.post("v3/performance/personnelExpenses/delList", list);
  },
  delExpensesInfo(list) {
    return xjaxios.get(`v3/performance/personnelExpenses/del?personnelExpensesId=${list}`);
  },
  /**
   * @description: 批量删除人员费用表
   * @param {Object} formData *
   * @return {Object}
   */
  personnelExpensesDownExcel(params) {
    return xjaxios.post("v3/performance/personnelExpenses/downExcel", params, { responseType: 'arraybuffer' });
  }
}
